package com.bookstore.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;
import java.util.List;

@TableName("book")
@Data
public class BookPO {

    @TableId(type = IdType.AUTO)
    private Integer id;

    @TableField("book_name")
    private String bookName;

    @TableField("infor")
    private String infor;

    @TableField("price")
    private float price;

    @TableField("create_time")
    private Date createTime;

    @TableField("book_pic")
    private String bookPic;

    @TableField("class_id")
    private Integer classId;

    @TableField("publisher")
    private String publisher;

    @TableField("status")
    private Integer status;

    @TableField(exist = false)
    private List<AuthorPo> authors;
    @TableField(exist = false)
    private String bookClassName;
}
